﻿using BIS.Utility.DAL.DataMapper;
using BIS.Utility.Converter;

namespace BIS.Portal.Modules.CMS.Entity
{
    public class ClientCmsArticleAndCategoryEntity : IEntity
    {

        #region Private member

        private int _article_id;
        private string _thumb_image;
        private int _is_hot_article;
        private string _article_title;
        private string _article_description;
        private int _language_in_use_id;
        private string _page_alias;
        private int _category_id;

        #endregion

        #region Pulbic properties
        public virtual int Article_id
        {
            get { return _article_id; }
            set { _article_id = value; }
        }

        public virtual string Thumb_image
        {
            get { return _thumb_image; }
            set { _thumb_image = value; }
        }

        public virtual int Is_hot_article
        {
            get { return _is_hot_article; }
            set { _is_hot_article = value; }
        }

        public virtual string Article_title
        {
            get { return _article_title; }
            set { _article_title = value; }
        }

        public virtual string Article_description
        {
            get { return _article_description; }
            set { _article_description = value; }
        }

        public virtual int Language_in_use_id
        {
            get { return _language_in_use_id; }
            set { _language_in_use_id = value; }
        }

        public virtual string Page_alias
        {
            get { return _page_alias; }
            set { _page_alias = value; }
        }

        public virtual int Category_id
        {
            get { return _category_id; }
            set { _category_id = value; }
        }

        #endregion

        #region Implement From IEntity Member

        public void Fill(System.Data.IDataReader reader)
        {
            Article_id = Functions.GetInt(reader["article_id"]);
            Thumb_image = Functions.GetString(reader["thumb_image"]);
            Is_hot_article = Functions.GetInt(reader["is_hot_article"]);
            Article_title = Functions.GetString(reader["article_title"]);
            Article_description = Functions.GetString(reader["article_description"]);
            Page_alias = Functions.GetString(reader["page_alias"]);
            Category_id = Functions.GetInt(reader["category_id"]);
            Language_in_use_id = Functions.GetInt(reader["language_in_use_id"]);
        }
        #endregion

    }
}
